package com.mk.admin.controller;

import com.mk.admin.log.*;
import com.mk.admin.model.*;
import com.mk.admin.model.vo.*;
import com.mk.admin.service.*;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.web.bind.annotation.*;

import java.util.*;

@RestController
@RequestMapping("/a/adm/eleOrder")
@Api(tags = "互联网处方")
public class EleOrderController {
    @Autowired
    private EleOrderService eleOrderService;

    @PostMapping("/select")
    public ResultDto select(@RequestBody EleOrderVo vo) {
        return eleOrderService.select(vo);
    }

    @PostMapping("/add")
    public ResultDto add(@RequestBody EleOrderVo vo) {
        return eleOrderService.add(vo);
    }

    @PostMapping("/addBatch")
    @ApiOperation(value = "批量提交处方")
    public ResultDto addBatch(@RequestBody EleOrderBatchVo vo) {
        return eleOrderService.addBatch(vo);
    }

    @PostMapping("/update")
    public ResultDto update(@RequestBody EleOrderVo vo) {
        return eleOrderService.update(vo);
    }

    @PostMapping("/delete")
    public ResultDto delete(@RequestBody EleOrderVo vo) {
        return eleOrderService.delete(vo.getId());
    }


    @PostMapping("/status")
    public ResultDto status(@RequestBody EleOrderVo vo) {
        return eleOrderService.status(vo.getId());
    }


}
